fix(sqlserver): escape SQL identifiers and literals in metadata/DDL paths (#1914) - #2196
Merged
Merged
Conversation
…per maintainer review (OtterMind#1914) - strengthen SqlServerIdentifierProcessor (SPI ISQLIdentifierProcessor): quoteIdentifier always bracket-quotes with ] doubling, escapeString doubles single quotes only (no backslash doubling in T-SQL) - SqlServerMetaData.getSQLIdentifierProcessor() returns the shared INSTANCE; metadata call sites use it (statics use INSTANCE directly) - builders/DBManager/enums/XML+Geography value processors rewired to SqlServerIdentifierProcessor.INSTANCE / static escapeIdentifier - collation validation moved to public SqlServerSqlGuards - SqlServerIdentifierUtils removed; tests migrated to SqlServerIdentifierProcessorTest (49 green)
…quote for DDL paths (OtterMind#1914)
openai0229
force-pushed
the
fix/sqli2-sqlserver
branch
from
July 29, 2026 09:00
48344f5 to
45719f6
Compare
openai0229
approved these changes
Jul 29, 2026
openai0229
left a comment
Contributor
There was a problem hiding this comment.
Maintainer review complete. Rebased onto current main, fixed SQL Server bracket/literal/default-expression semantics, and verified with the eight-module clean reactor suite (188/188 tests passed).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #1914
Summary
Completes the SQL Server database-plugin portion of the identifier and literal escaping work.
SqlServerIdentifierProcessorand removes the parallel identifier utility.quoteIdentifier(...)semantics while usingquoteIdentifierAlways(...)for generated DDL and inherited builder/manager paths.Affected surfaces
Verification
mvn -B -f chat2db-community-server/pom.xml -pl chat2db-community-plugins/chat2db-community-sqlserver -am clean test -DskipTests=false -Dmaven.test.skip=false -Dsurefire.failIfNoSpecifiedTests=falseBUILD SUCCESSacross 8 reactor modules; 188 tests passed in tested modules, including SQL Server72/72, SPI90/90, and tools26/26.git diff --check origin/main...HEAD: passed.Risk and compatibility
ISQLIdentifierProcessorcontract.Reviewer map
SqlServerIdentifierProcessor,SqlServerSqlGuards, thenSqlServerSqlBuilder,SqlServerDBManager, andSqlServerColumnTypeEnum.Contributor declaration
AI assistance: Substantial AI-assisted maintainer revision, review, and test expansion; all final changes were source-reviewed and verified with the commands above.